﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Vita.Entities;
using Vita.Entities.Services;

namespace Vita.Modules.BackgroundTasks {
  public class BackgroundTasksModule : EntityModule {
    public static readonly Version CurrentVersion = new Version("1.0.0.0");
    ITimerService _timerService; 

    public BackgroundTasksModule(EntityArea area) : base(area, "BackgroundTasks", version: CurrentVersion) {
      RegisterEntities(typeof(ITaskInvocation), typeof(IBackgroundTaskRun));
    }

    public override void Init() {
      base.Init();
      _timerService = App.GetService<ITimerService>();
      _timerService.Elapsed10Seconds += TimerService_Elapsed10Seconds;
    }

    void TimerService_Elapsed10Seconds(object sender, EventArgs e) {
      
    }
  }//class
}
